package com.chucang.shucang.usr.feign;

import com.chucang.shucang.common.base.constant.SecurityConstant;
import com.chucang.shucang.common.base.utils.R;
import com.chucang.shucang.common.mq.to.BlindBoxOrderBaseTO;
import com.chucang.shucang.common.mq.to.CollectionOrderBaseTO;
import com.chucang.shucang.usr.feign.vo.BlindBoxOrderBaseResVO;
import com.chucang.shucang.usr.feign.vo.BlindBoxOrderItemsVO;
import com.chucang.shucang.usr.feign.vo.CollectionOrderBaseResVO;
import com.chucang.shucang.usr.feign.vo.CollectionOrderItemsVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author flitsneak
 * @email flitsneak@gmail.com
 * @date 2022/10/15 16:45
 * @description
 */
@FeignClient(contextId = "usr-oms", value = "shucang-oms")
public interface OmsService {

    @PostMapping("/oms/collectionorderbase/createCollectionOrder")
    R<String> createCollectionOrder(@RequestBody CollectionOrderBaseTO collectionOrderBase, @RequestHeader(SecurityConstant.FROM) String from);

    @PostMapping("/oms/blindboxorderbase/createBlindBoxOrder")
    R<String> createBlindBoxOrder(@RequestBody BlindBoxOrderBaseTO blindBoxOrderBase, @RequestHeader(SecurityConstant.FROM) String from);

    @GetMapping("/oms/blindboxorderbase/checkBlindBoxOrder/{orderSn}")
    R<BlindBoxOrderBaseResVO> checkBlindBoxOrder(@PathVariable("orderSn") String orderSn);

    @GetMapping("/oms/collectionorderbase/checkCollectionOrder/{orderSn}")
    R<CollectionOrderBaseResVO> checkCollectionOrder(@PathVariable("orderSn") String orderSn);

    @GetMapping("/oms/collectionorderbase/collectionOrderSuccessByWallet/{orderSn}")
    R<String> collectionOrderSuccessByWallet(@PathVariable("orderSn") String orderSn, @RequestHeader(SecurityConstant.FROM) String from);

    @GetMapping("/oms/collectionorderbase/collectionOrderSuccessByAliPay/{orderSn}")
    R<String> collectionOrderSuccessByAliPay(@PathVariable("orderSn") String orderSn, @RequestHeader(SecurityConstant.FROM) String from);

    @GetMapping("/oms/blindboxorderbase/blindBoxOrderSuccessByWallet/{orderSn}")
    R<String> blindBoxOrderSuccessByWallet(@PathVariable("orderSn") String orderSn, @RequestHeader(SecurityConstant.FROM) String from);

    @GetMapping("/oms/blindboxorderbase/blindBoxOrderSuccessByAliPay/{orderSn}")
    R<String> blindBoxOrderSuccessByAliPay(@PathVariable("orderSn") String orderSn, @RequestHeader(SecurityConstant.FROM) String from);

    @PostMapping("/oms/collectionorderitem/addCollectionOrderItems")
    R<String> addCollectionOrderItems(@RequestBody CollectionOrderItemsVO collectionOrderItemsVO, @RequestHeader(SecurityConstant.FROM) String from);

    @PostMapping("/oms/blindboxorderitem/addBlindBoxOrderItems")
    R<String> addBlindBoxOrderItems(@RequestBody BlindBoxOrderItemsVO blindBoxOrderItemsVO, @RequestHeader(SecurityConstant.FROM) String from);
}